﻿<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Show Cliente</title>
    </head>
    <body>
        <div class="nav">
          
            <span class="menuButton"><g:link class="list" action="list">Listar Clientes </g:link></span>
            <span class="menuButton"><g:link class="create" action="create">Novo Cliente</g:link></span>
        </div>
        <div class="body">
            <h1>Exibindo Cliente</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="dialog">
                <table>
                    <tbody>	
						<tr class="prop">
                            <td valign="top" class="name">Nome:</td>
                            
                            <td valign="top" class="value">${cliente.nome}</td>
                            
                        </tr> 
                        <tr class="prop">
                            <td valign="top" class="name">Cnpj:</td>
                            
                            <td valign="top" class="value">${cliente.cnpj}</td>
                            
                        </tr>                  
                        <tr class="prop">
                            <td valign="top" class="name">Data Inclusão:</td>
                            
                            <td valign="top" class="value"><g:formatDate format="dd-MM-yyyy" date="${cliente.dataInclusao.time}" /></td>
                            
                        </tr>
                    </tbody>
                </table>
				<h2>Endereço</h2>
				<table>
                    <tbody>                  
                        <tr class="prop">
                            <td valign="top" class="name">Rua:</td>                          
                            <td valign="top" class="value">${cliente?.endereco.rua}</td>
                    
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Numero:</td>
                            
                            <td valign="top" class="value">${cliente?.endereco.numero}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Complemento:</td>
                            
                            <td valign="top" class="value">${cliente?.endereco.complemento}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Bairro:</td>
                            
                            <td valign="top" class="value">${cliente?.endereco.bairro}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Cidade:</td>
                            
                            <td valign="top" class="value">${cliente?.endereco.cidade.nome}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Uf:</td>
                            
                            <td valign="top" class="value">${cliente?.endereco?.uf?.nome}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Cep:</td>
                            
                            <td valign="top" class="value">${cliente?.endereco.cep}</td>
                            
                        </tr>
                    
                    </tbody>
                </table>
				
				<h2>Gerente</h2>
				<table>
			                    <tbody>			                    
									<tr class="prop">
			                            <td valign="top" class="name">Nome:</td>
			                            
			                            <td valign="top" class="value">${cliente?.gerente.nomePessoa}</td>
			                            
			                        </tr>
			                        <tr class="prop">
			                            <td valign="top" class="name">Cpf:</td>
			                            
			                            <td valign="top" class="value">${cliente?.gerente.cpf}</td>
			                            
			                        </tr>
			                    
			                        <tr class="prop">
			                            <td valign="top" class="name">Data Nascimento:</td>
			                            
			                            <td valign="top" class="value"><g:formatDate format="dd-MM-yyyy" date="${cliente?.gerente.dataNascimento.time}" /></td>
			                            
			                        </tr>
			                    
			                        
			                    
			                    </tbody>
			                </table>
            </div>
            <div class="buttons">
                <g:form>
                    <input type="hidden" name="id" value="${cliente?.id}" />
                    <span class="button"><g:actionSubmit action="edit" class="edit" value="Editar" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" onclick="return confirm('Tem certeza?');" value="Excluir" /></span>
                </g:form>
            </div>
        </div>
    </body>
</html>
